package com.trust.pams.service.read.impl;

import com.alibaba.dubbo.common.logger.Logger;
import com.alibaba.dubbo.common.logger.LoggerFactory;
import com.chasonx.common.model.PageResult;
import com.chasonx.common.util.Ret;
import com.trust.pams.dao.service.PamsMilestoneDao;
import com.trust.pams.dto.PamsClientDto;
import com.trust.pams.dto.PamsMilestoneDto;
import com.trust.pams.model.query.PamsMilestoneQuery;
import com.trust.pams.service.read.PamsMilestoneRead;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class PamsMilestoneReadImpl implements PamsMilestoneRead {

    private static final Logger log = LoggerFactory.getLogger(PamsMilestoneReadImpl.class);

    @Autowired
    private PamsMilestoneDao pamsMilestoneDao;

    @Override
    public Ret ListPamsMilestone(PamsMilestoneQuery pamsMilestoneQuery) {
        try{
            PageResult<PamsMilestoneDto> pageData = pamsMilestoneDao.listPamsMilestone(pamsMilestoneQuery);

            return Ret.get().setData(pageData).success();
        }catch (Exception e){
            log.error("listSdtmDataByPage exception => " , e);
        }
        return Ret.get().faild();
    }
}
